Optimal. Leaf size=106 \[ \frac {d-2 e+4 f-8 g+16 h}{12 (x+2)}-\frac {1}{18} \log (1-x) (d+e+f+g+h)+\frac {1}{48} \log (2-x) (d+2 e+4 f+8 g+16 h)+\frac {1}{6} \log (x+1) (d-e+f-g+h)-\frac {1}{144} \log (x+2) (19 d-26 e+28 f-8 g-80 h) \]
________________________________________________________________________________________
Rubi [A] time = 0.27, antiderivative size = 106, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 46, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.043, Rules used = {1586, 6742} \begin {gather*} \frac {d-2 e+4 f-8 g+16 h}{12 (x+2)}-\frac {1}{18} \log (1-x) (d+e+f+g+h)+\frac {1}{48} \log (2-x) (d+2 e+4 f+8 g+16 h)+\frac {1}{6} \log (x+1) (d-e+f-g+h)-\frac {1}{144} \log (x+2) (19 d-26 e+28 f-8 g-80 h) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1586
Rule 6742
Rubi steps
\begin {align*} \int \frac {\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3+h x^4\right )}{\left (4-5 x^2+x^4\right )^2} \, dx &=\int \frac {d+e x+f x^2+g x^3+h x^4}{(2+x)^2 \left (2-x-2 x^2+x^3\right )} \, dx\\ &=\int \left (\frac {d+2 e+4 f+8 g+16 h}{48 (-2+x)}+\frac {-d-e-f-g-h}{18 (-1+x)}+\frac {d-e+f-g+h}{6 (1+x)}+\frac {-d+2 e-4 f+8 g-16 h}{12 (2+x)^2}+\frac {-19 d+26 e-28 f+8 g+80 h}{144 (2+x)}\right ) \, dx\\ &=\frac {d-2 e+4 f-8 g+16 h}{12 (2+x)}-\frac {1}{18} (d+e+f+g+h) \log (1-x)+\frac {1}{48} (d+2 e+4 f+8 g+16 h) \log (2-x)+\frac {1}{6} (d-e+f-g+h) \log (1+x)-\frac {1}{144} (19 d-26 e+28 f-8 g-80 h) \log (2+x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 102, normalized size = 0.96 \begin {gather*} \frac {1}{144} \left (\frac {12 (d-2 e+4 f-8 g+16 h)}{x+2}+24 \log (-x-1) (d-e+f-g+h)-8 \log (1-x) (d+e+f+g+h)+3 \log (2-x) (d+2 (e+2 f+4 g+8 h))+\log (x+2) (-19 d+26 e-28 f+8 g+80 h)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (2-x-2 x^2+x^3\right ) \left (d+e x+f x^2+g x^3+h x^4\right )}{\left (4-5 x^2+x^4\right )^2} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 14.10, size = 164, normalized size = 1.55 \begin {gather*} -\frac {{\left ({\left (19 \, d - 26 \, e + 28 \, f - 8 \, g - 80 \, h\right )} x + 38 \, d - 52 \, e + 56 \, f - 16 \, g - 160 \, h\right )} \log \left (x + 2\right ) - 24 \, {\left ({\left (d - e + f - g + h\right )} x + 2 \, d - 2 \, e + 2 \, f - 2 \, g + 2 \, h\right )} \log \left (x + 1\right ) + 8 \, {\left ({\left (d + e + f + g + h\right )} x + 2 \, d + 2 \, e + 2 \, f + 2 \, g + 2 \, h\right )} \log \left (x - 1\right ) - 3 \, {\left ({\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h\right )} x + 2 \, d + 4 \, e + 8 \, f + 16 \, g + 32 \, h\right )} \log \left (x - 2\right ) - 12 \, d + 24 \, e - 48 \, f + 96 \, g - 192 \, h}{144 \, {\left (x + 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.29, size = 101, normalized size = 0.95 \begin {gather*} -\frac {1}{144} \, {\left (19 \, d + 28 \, f - 8 \, g - 80 \, h - 26 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) + \frac {1}{6} \, {\left (d + f - g + h - e\right )} \log \left ({\left | x + 1 \right |}\right ) - \frac {1}{18} \, {\left (d + f + g + h + e\right )} \log \left ({\left | x - 1 \right |}\right ) + \frac {1}{48} \, {\left (d + 4 \, f + 8 \, g + 16 \, h + 2 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) + \frac {d + 4 \, f - 8 \, g + 16 \, h - 2 \, e}{12 \, {\left (x + 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 182, normalized size = 1.72 \begin {gather*} \frac {5 h \ln \left (x +2\right )}{9}-\frac {h \ln \left (x -1\right )}{18}+\frac {h \ln \left (x +1\right )}{6}+\frac {h \ln \left (x -2\right )}{3}-\frac {g \ln \left (x -1\right )}{18}+\frac {g \ln \left (x +2\right )}{18}+\frac {g \ln \left (x -2\right )}{6}-\frac {g \ln \left (x +1\right )}{6}-\frac {19 d \ln \left (x +2\right )}{144}+\frac {13 e \ln \left (x +2\right )}{72}-\frac {e \ln \left (x -1\right )}{18}-\frac {d \ln \left (x -1\right )}{18}-\frac {e \ln \left (x +1\right )}{6}+\frac {d \ln \left (x +1\right )}{6}+\frac {d \ln \left (x -2\right )}{48}+\frac {e \ln \left (x -2\right )}{24}+\frac {f \ln \left (x -2\right )}{12}+\frac {f \ln \left (x +1\right )}{6}-\frac {f \ln \left (x -1\right )}{18}-\frac {7 f \ln \left (x +2\right )}{36}+\frac {f}{3 x +6}+\frac {d}{12 x +24}+\frac {4 h}{3 \left (x +2\right )}-\frac {2 g}{3 \left (x +2\right )}-\frac {e}{6 \left (x +2\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 92, normalized size = 0.87 \begin {gather*} -\frac {1}{144} \, {\left (19 \, d - 26 \, e + 28 \, f - 8 \, g - 80 \, h\right )} \log \left (x + 2\right ) + \frac {1}{6} \, {\left (d - e + f - g + h\right )} \log \left (x + 1\right ) - \frac {1}{18} \, {\left (d + e + f + g + h\right )} \log \left (x - 1\right ) + \frac {1}{48} \, {\left (d + 2 \, e + 4 \, f + 8 \, g + 16 \, h\right )} \log \left (x - 2\right ) + \frac {d - 2 \, e + 4 \, f - 8 \, g + 16 \, h}{12 \, {\left (x + 2\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.36, size = 108, normalized size = 1.02 \begin {gather*} \frac {\frac {d}{12}-\frac {e}{6}+\frac {f}{3}-\frac {2\,g}{3}+\frac {4\,h}{3}}{x+2}+\ln \left (x+1\right )\,\left (\frac {d}{6}-\frac {e}{6}+\frac {f}{6}-\frac {g}{6}+\frac {h}{6}\right )-\ln \left (x-1\right )\,\left (\frac {d}{18}+\frac {e}{18}+\frac {f}{18}+\frac {g}{18}+\frac {h}{18}\right )+\ln \left (x-2\right )\,\left (\frac {d}{48}+\frac {e}{24}+\frac {f}{12}+\frac {g}{6}+\frac {h}{3}\right )+\ln \left (x+2\right )\,\left (\frac {13\,e}{72}-\frac {19\,d}{144}-\frac {7\,f}{36}+\frac {g}{18}+\frac {5\,h}{9}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________